if (isNil "paramsArray") then {
	if (isClass (missionConfigFile/"Params")) then {
		diag_log Format["ParamClass (%1): %2",isNil "paramsArray", count (missionConfigFile/"Params")];
		for "_i" from 0 to (count (missionConfigFile/"Params") - 1) do {
			_paramName = configName ((missionConfigFile >> "Params") select _i);
			missionNamespace setVariable [_paramName, getNumber (missionConfigFile >> "Params" >> _paramName >> "default")];
			// diag_log Format["Param %1: %2",_paramName, (missionNameSpace getVariable _paramName)];
		};
	};
} else {
	diag_log Format["ParamArray (%1): %2",isNil "paramsArray",count paramsArray];
	for "_i" from 0 to (count paramsArray - 1) do {
		missionNamespace setVariable [configName ((missionConfigFile >> "Params") select _i), paramsArray select _i];
		// diag_log Format["Param %1: %2",(configName ((missionConfigFile >> "Params") select _i)), (paramsArray select _i)];
	};
};

if (!isnil "PR_mission_debug_messages") then {d_mission_debug_messages = (PR_mission_debug_messages == 1);};
if (!isnil "PR_KRON_UPS_Debug") then { KRON_UPS_Debug = PR_KRON_UPS_Debug;};
if (!isnil "PR_Global_Debug") then { d_global_debug = PR_Global_Debug;};
if (!isnil "PR_FRIENDLY_FIRE") then {D_Friendly_Fire = (PR_FRIENDLY_FIRE == 1);};
if (!isnil "PR_EVERYONE_RESCUE") then {d_all_player_can_rescue = (PR_EVERYONE_RESCUE == 1);};
if (!isnil "PR_revive_script") then {d_revive_script = if (PR_revive_script == 1) then {"R3F"} else {"NORRN"};};
if (!isnil "PR_max_respawns") then {d_max_respawns = PR_max_respawns;};
if (!isnil "PR_unconscious_time_limit") then {d_unconscious_time_limit = PR_unconscious_time_limit;};
if (!isnil "PR_NORRN_respawn_button_timer") then {d_NORRN_respawn_button_timer = PR_NORRN_respawn_button_timer;};
if (!isnil "PR_NORRN_no_of_heals") then {d_NORRN_no_of_heals = 0;};
if (!isnil "PR_nornn_unit_medpacks") then {d_nornn_unit_medpacks = PR_nornn_unit_medpacks;};
if (!isnil "PR_nornn_unit_bandages") then {d_nornn_unit_bandages = PR_nornn_unit_bandages;};
if (!isnil "PR_WithBackpack") then {WithBackpack = (PR_WithBackpack > 0);};
if (!isnil "PR_PublicMissionScreen") then {PublicMissionScreen = (PR_PublicMissionScreen > 0);};
if (!isnil "PR_dont_show_player_markers_at_all") then {d_dont_show_player_markers_at_all = (PR_dont_show_player_markers_at_all > 0);};
if (!isnil "PR_dont_show_vehicle_markers_at_all") then {d_dont_show_vehicle_markers_at_all = (PR_dont_show_vehicle_markers_at_all > 0);};
if (!isnil "PR_p_marker_dirs") then {d_p_marker_dirs = (PR_p_marker_dirs > 0);};
if (!isnil "PR_v_marker_dirs") then {d_v_marker_dirs = (PR_v_marker_dirs > 0);};
if (!isnil "PR_WithAirTaxi") then {WithAirTaxi = if(PR_WithAirTaxi > 0) then {true} else {false};};
if (!isnil "PR_WithAirTaxiWaypoints") then {WithAirTaxiWaypoints = if(PR_WithAirTaxiWaypoints > 0) then {true} else {false};};
if (!isnil "PR_HALOWaitTime") then {d_HALOWaitTime = PR_HALOWaitTime;};
if (!isnil "PR_HaloScript") then {HaloScript = PR_HaloScript;};
if (!isnil "PR_HALOJumpHeight") then {HALOJumpHeight = PR_HALOJumpHeight;};
if (!isnil "PR_ParaAtBase") then {ParaAtBase = if(PR_ParaAtBase > 0) then {true} else {false};};
if (!isnil "PR_VecCreateWaitTime") then {VecCreateWaitTime = PR_VecCreateWaitTime;};
if (!isnil "PR_WithLessArmor") then {PR_WithLessArmor = 0;};
if (!isnil "PR_WithEmulatedFLIR") then {WithEmulatedFLIR = if(PR_WithEmulatedFLIR > 0) then {true} else {false};};
if (!isnil "PR_MaxNumAmmoboxes") then {d_MaxNumAmmoboxes = PR_MaxNumAmmoboxes;};
if (!isnil "PR_EnemySkill") then {EnemySkill = PR_EnemySkill;};
if (!isnil "PR_available_drop_vehicles") then {d_available_drop_vehicles = PR_available_drop_vehicles;};
if (!isnil "PR_WithAntiAirRadar") then {WithAntiAirRadar = if (PR_WithAntiAirRadar > 0) then {true} else {false};};
if (!isnil "PR_blockspacebarscanning") then {d_blockspacebarscanning = if(PR_blockspacebarscanning > 0) then {true} else {false};};
if (!isnil "PR_add_vintorez_to_west") then {d_add_vintorez_to_west = if(PR_add_vintorez_to_west > 0) then {true} else {false};};
if (!isnil "PR_ARTY_AND_LOG_ALLOWRUNNING") then {R3F_ARTY_AND_LOG_ALLOWRUNNING = if(PR_ARTY_AND_LOG_ALLOWRUNNING > 0)then {true} else {false};};
if (!isnil "PR_PlayerArmor") then {D_player_armor = PR_PlayerArmor;};
if (!isnil "PR_UPS_ShareDist") then {KRON_UPS_sharedist = PR_UPS_ShareDist;};
if (!isnil "PR_can_change_grass") then {d_canChangeGrassLayer = if (PR_can_change_grass > 0) then { true } else {false};};
if (!isnil "PR_Footmen_Base_Amount") then {d_footmen_base = PR_Footmen_Base_Amount;};
if (!isnil "PR_Statics_Base_Amount") then {d_static_base = PR_Statics_Base_Amount;};
if (!isnil "PR_Wheeled_Base_Amount") then {d_wheeled_base = PR_Wheeled_Base_Amount;};
if (!isnil "PR_Armored_Base_Amount") then {d_armor_base = PR_Armored_Base_Amount;};

diag_log Format["Base amounts: %1, %2, %3, %4", d_footmen_base, d_static_base, d_wheeled_base,d_armor_base];

if (!isMultiplayer && isServer && local player) then {
	d_mission_debug_messages = true;
};